/**  
 * All rights Reserved, Designed By www.woniuxy.com
 * @Title:  Account.java   
 * @Package com.woniu.domain   
 * @Description:    Description  
 * @author: 蜗牛学院  
 * @date:   2019年8月22日 下午5:00:08
 * @user:   Administrator  
 * @version V1.0 
 * @Copyright: 2019 www.woniuxy.com Inc. All rights reserved. 
 * 注意：本内容仅限于成都蜗牛创想科技有限公司，禁止外泄以及用于其他的商业目
 */ 
package com.woniu.ssh.domain;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author Administrator
 *
 */
@Entity
@Table(name="t_animal")
public class Animal {
	private int aid;
	private String aname;
	private String imgPath;
	private Date createDate;
	private Category category;
	private Distribution distribution;
	/**
	 * @return the aid
	 */
	@Id
	@GeneratedValue
	public int getAid() {
		return aid;
	}
	/**
	 * @param aid the aid to set
	 */
	public void setAid(int aid) {
		this.aid = aid;
	}
	/**
	 * @return the aname
	 */
	public String getAname() {
		return aname;
	}
	/**
	 * @param aname the aname to set
	 */
	public void setAname(String aname) {
		this.aname = aname;
	}
	/**
	 * @return the imgPath
	 */
	public String getImgPath() {
		return imgPath;
	}
	/**
	 * @param imgPath the imgPath to set
	 */
	public void setImgPath(String imgPath) {
		this.imgPath = imgPath;
	}
	/**
	 * @return the createDate
	 */
	
	public Date getCreateDate() {
		return createDate;
	}
	/**
	 * @param createDate the createDate to set
	 */
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	/**
	 * @return the category
	 */
	@ManyToOne
	@JoinColumn(name="category_id")
	public Category getCategory() {
		return category;
	}
	/**
	 * @param category the category to set
	 */
	public void setCategory(Category category) {
		this.category = category;
	}
	/**
	 * @return the distribution
	 */
	@ManyToOne
	@JoinColumn(name="distribution_id")
	public Distribution getDistribution() {
		return distribution;
	}
	/**
	 * @param distribution the distribution to set
	 */
	public void setDistribution(Distribution distribution) {
		this.distribution = distribution;
	}
	@Override
	public String toString() {
		return "Animal [aid=" + aid + ", aname=" + aname + ", imgPath=" + imgPath + ", createDate=" + createDate
				+ ", category=" + category + ", distribution=" + distribution + "]";
	}
	public Animal(int aid, String aname, String imgPath, Date createDate, Category category,
			Distribution distribution) {
		super();
		this.aid = aid;
		this.aname = aname;
		this.imgPath = imgPath;
		this.createDate = createDate;
		this.category = category;
		this.distribution = distribution;
	}
	public Animal(String aname, String imgPath, Date createDate, Category category, Distribution distribution) {
		super();
		this.aname = aname;
		this.imgPath = imgPath;
		this.createDate = createDate;
		this.category = category;
		this.distribution = distribution;
	}
	public Animal() {
		super();
		// TODO Auto-generated constructor stub
	}
	
}
